﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using EvriConnector;
using OpenCalaisConnector;
using DataType; 

namespace ContentAnalyzer
{
    public class Analyzer
    {
        private ServiceHost m_evri;
        private OpenCalaisconnector m_calais;

        public Analyzer()
        {
            m_evri = new ServiceHost();
            m_calais = new OpenCalaisconnector(); 
        }

        public Stream DoAnalyze(string content, ContentFormat format)
        {
            //in this place would be complex logic with using several connectors
            //there is no clear understanding how several connectors will work together
            return m_evri.ProcessRequest(content, format);
        }

        public string DoAnalyzeRSS(string content, ContentFormat format)
        {
            //in this place would be complex logic with using several connectors
            //there is no clear understanding how several connectors will work together
            return m_evri.ProcessRequestToRSS(content, format);
        }

       //public 

        public string DoAnalyzeCalais(string content)
        {
            return m_calais.DoCalaisRequest(content); 
        }

        public List<TagEntry> DoCalaisRequestEntries(string content)
        {
            return m_calais.DoCalaisRequestEntries(content);
        }

    }
}
